﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewSunjectManagerZJEdit.aspx.cs" Inherits="ExamV5.StudyInfo.NewSunjectManagerZJEdit" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../layui/css/layui.css" rel="stylesheet" type="text/css" />
    <link href="../Image/examstyle.css" rel="stylesheet" type="text/css" />
    <title>编辑章节</title>
</head>
<body>
    <form id="form1" runat="server" class="layui-form">
        <div class="zj_title">
            <img src="../Image/images/bianji.png" />编辑《<asp:Label ID="labBookName" runat="server" Text=""></asp:Label>》章节信息
        </div>
<%--        <asp:ScriptManager ID="SM" runat="server"></asp:ScriptManager>
        <asp:UpdatePanel runat="server" ID="UPPart">
            <ContentTemplate>--%>
                <div class="tankuang bianji_zj">
                    <div class="zj_nav">
                        <h1>
                            <asp:Label ID="labBookName1" runat="server" Text=""></asp:Label></h1>

                        <asp:TreeView ID="TreeZJ" runat="server"
                            ImageSet="Custom"
                            NoExpandImageUrl="~/Image/images/space.png"
                            ExpandImageUrl="~/Image/images/jc_shouqi.png"
                            CollapseImageUrl="~/Image/images/jc_zhankai.png"
                            NodeStyle-Font-Size="14px"
                            NodeStyle-Height="30"
                            ShowLines="false">
                        </asp:TreeView>
                    </div>
                    <div class="zj_main">
                        <div class="layui-form-item">
                            <label class="layui-form-label">上级章节</label>
                            <div class="layui-input-inline w485">
                                <asp:DropDownList ID="DDLUPItem" runat="server"></asp:DropDownList>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">章节名称</label>
                            <div class="layui-input-inline w485">
                                <asp:TextBox ID="txtItemTitle" runat="server" CssClass="layui-input radius5" MaxLength="50"></asp:TextBox>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">累计学分</label>
                            <div class="layui-input-inline w485">
                                <asp:TextBox ID="txtFen" runat="server" CssClass="layui-input radius5"
                                    MaxLength="5"
                                    onKeypress="javascript:if ((event.keyCode < 48 || event.keyCode > 57) && event.keyCode!=13 && event.keyCode!=46) event.returnValue = false;"
                                    onpaste="return false">0</asp:TextBox>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">章节内容</label>
                            <div class="layui-input-inline w485">
                                <!--<input type="password" class="layui-input radius5">-->
                                <div class="word_bjq">
                                    <asp:Panel runat="server" ID="content">
                                        <script type="text/plain" name="editor" id="editor"></script>
                                    </asp:Panel>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">排列序号</label>
                            <div class="layui-input-inline w485">
                                <asp:TextBox ID="txtSortInfo" runat="server" CssClass="layui-input radius5"
                                    MaxLength="5"
                                    onKeypress="javascript:if (event.keyCode &lt; 48 || event.keyCode &gt; 57) event.returnValue = false;"
                                    onpaste="return false">1</asp:TextBox>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label"></label>
                            <div class="layui-input-block">
                                <asp:Button ID="butDefault" runat="server" Text="提  交" CssClass="layui-btn radius5 bg_blue w120" OnClientClick="return CheckData();" OnClick="butDefault_Click" />
                                <asp:Button ID="butDel" runat="server" Text="删  除" CssClass="layui-btn radius5 bg_blue w120" OnClick="butDel_Click" />
                                <input type="button" class="layui-btn radius5 bg_c8c8c8 w120" value="关闭" onclick="window.close();" />
                            </div>
                        </div>
                    </div>
                </div>

<%--            </ContentTemplate>
        </asp:UpdatePanel>--%>
    </form>

    <script src="../layui/layui.all.js"></script>
    <script type="text/javascript" src="../Image/jquery.min.js"></script>
    <script src="../UEditor/ueditor.config.js"></script>
    <script src="../UEditor/ueditor.all.min.js"></script>
    <script>
        var config = {
            initialFrameWidth: '100%',
            initialFrameHeight: '400px',
            enableAutoSave: false,
            saveInterval: 100000,
            elementPathEnabled: false,
            autoHeightEnabled: false,
            autoFloatEnabled: false,
            onready: function () {
                setContent('<% =this.ItemContent %>');
            }
        };
        var ue = UE.getEditor('editor', config);

        function setContent(content) {
            UE.getEditor('editor').setContent(content);
        }


        layui.use('form', function () {
            var form = layui.form;
            form.render();
        });
        function CheckData() {
            if (document.getElementById("txtItemTitle").value == "") {
                alert("章节名称不可以为空！");
                document.getElementById("txtItemTitle").focus();
                return false;
            }
            if (document.getElementById("txtFen").value == "") {
                alert("累计学分不可以为空！");
                document.getElementById("txtFen").focus();
                return false;
            }
            if (document.getElementById("txtSortInfo").value == "") {
                alert("章节排序不可以为空！");
                document.getElementById("txtSortInfo").focus();
                return false;
            }

            return true;
        }
    </script>
</body>
</html>
